<template>
    <div>
		<div class="pre-air-header">{{itemsa.name}}</div>
		<div class="predid" style="display: none">{{itemsa.deviceid}}</div>
		<div class="pre-air-content">
			<ul>
				<li>
					<div class="pre-air-name">采集状态:</div>
					<div class="pre-air-data" >
                         <div class="device-status" :class="{device_status_active:alarms['720896']}"></div>
				    </div>
				</li>
				<li>
					<div class="pre-air-name">室内温度:</div>
					<div class="pre-air-data" >{{alarms["720897"]}}</div>°C
				</li>
				<li>
					<div class="pre-air-name">室内湿度:</div>
					<div class="pre-air-data">{{alarms["720898"]}}</div>%
				</li>
				<li>
					<div class="pre-air-name">运行模式:</div>
					<div class="pre-air-data">{{alarms["720901"]}}</div>
				</li>
				<li>
					<div class="pre-air-name">报警数:</div>
					<div class="pre-air-data pre-active">{{neab}}</div>
					<div v-show="neab != 0?true:false" class="pre-air-more" @click="get_more">查看</div>
				</li>
			</ul>
		</div>
    </div>
</template>
<script>
export default {
	props:["itemsa","neab","alarms"],
	data(){
		return{
			alarm_time:[]
		}
	},
	methods:{
		get_more(){
			this.$emit('on-shows',this.itemsa);
		}
	},
}
</script>
<style>
.device-status{
  width:13px;
  height:13px;
  border-radius: 50%;
  background: #13ce66;
  box-shadow: 2px 2px 3px #bfbeb8;
  margin: auto;
  margin-top: 5px;
}
.device_status_active{
  background: #ff4949;
}
</style>